# from flask import Flask
#
# app = Flask(__name__)
#
#
# @app.route("/")
# def index():
#     return '哈哈'
#
# if __name__ == '__main__':
#     app.run()

from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand

from app2 import create_app, db

if __name__ == "__main__":
    # 创建flask对象
    app = create_app("development")
    # print(app.url_map)
    # 创建Manager对象
    manager = Manager(app)
    # 创建数据迁移对象
    migrate = Migrate(app, db)
    # 将数据库迁移时的命令添加到manager上
    manager.add_command("db", MigrateCommand)
    # app.run()
    manager.run()




